<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改医废 报模版 配置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-reports-edit" th:object="${yfReportsConfig}">
            <input name="id" th:field="*{id}" type="hidden">



            <div class="form-group">    
                <label class="col-sm-3 control-label">医院：</label>
                <div class="col-sm-8">

                    <select name="hospitalId" id="hospitalId" class="form-control m-b" th:with="type=${@dep.getDep()}"
                            required>
                        <option value="">请选择</option>
                        <option th:each="dep : ${type}" th:text="${dep.deptName}" th:value="${dep.deptId}" th:field="*{hospitalId}"></option>
                    </select>
                </div>
            </div>



            <div class="form-group">    
                <label class="col-sm-3 control-label">报表名称：</label>
                <div class="col-sm-8">
                    <input name="rTName" th:field="*{rTName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版标题：</label>
                <div class="col-sm-8">
                    <input name="rTTitle" th:field="*{rTTitle}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版地址：</label>
                <div class="col-sm-8">
                    <input name="rTPath" th:field="*{rTPath}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">json数据：</label>
                <div class="col-sm-8">
                    <textarea name="rTJson" class="form-control full">[[*{rTJson}]]</textarea>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> <a>帮助</a></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">sql语句 ：</label>
                <div class="col-sm-8">
                    <textarea name="rTSql" class="form-control full-lg">[[*{rTSql}]]</textarea>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 只可使用 select 查询 "yf_"开头的表</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">回显名称排序：</label>
                <div class="col-sm-8">
                    <textarea name="selectNameSort" class="form-control">[[*{selectNameSort}]]</textarea>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> select 名称排序以逗号分隔:i1,d2,l4</span>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">列合计：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_show_hide')}">

                        <input type="radio" th:id="${'columnSum_' + dict.dictCode}" name="columnSum" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'columnSum_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea id="remark" name="remark" maxlength="400" class="form-control" th:text="*{remark}"></textarea>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "yf/reports";
        $("#form-reports-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-reports-edit').serialize());
            }
        }
    </script>
</body>
</html>